const Controller = require('egg').Controller;

class InfoController extends Controller {
  // add
  async add() {
    const { ctx, app } = this;
    const data = await ctx.service.info.add();
    ctx.body = data
  }
  async delete() {
    const { ctx, app } = this;
    const data = await ctx.service.info.delete();
    ctx.body = data
  }
  async update() {
    const { ctx, app } = this;
    const data = await ctx.service.info.update();
    ctx.body = data
  }
  // liebiao
  async findAll() {
    const { ctx, app } = this;
    const data = await ctx.service.info.findAll();
    ctx.body = data
  }
  // page
  async page() {
    const { ctx, app } = this;
    const data = await ctx.service.info.page();
    ctx.body = data
  }
  // moshu
  async search() {
    const { ctx, app } = this;
    const data = await ctx.service.info.search();
    ctx.body = data
  }
  // 
  async deleteAll() {
    const { ctx, app } = this;
    const data = await ctx.service.info.deleteAll();
    ctx.body = data
  }
}

module.exports = InfoController;